#pragma once

#include <stdio.h>
#include "Vector2.h"
#include "Scene.h"
#include "Player.h"
#include <allegro5\allegro.h>
#include <vector>
#include "Block.h"
#include <map>


class LevelGenerator
{

public:
	
	static LevelGenerator *GetInstance();
	/*
	count-1 is the size of this array
	If you know a better way to do this, please improve it.
	*/
	enum BlockColor {Blue, Red, Green, Yelllow, White, Black, COUNT}; 
	static void DestroyInstance();
	
	BlockColor RandomBlockColor();
	// generates a color that isn't pick up yet
	BlockColor RaffleColor();
	Scene *CreateScene(int amountPlayers, ALLEGRO_BITMAP* background);

private:
	LevelGenerator(){};
	LevelGenerator(const LevelGenerator &);
	LevelGenerator& operator=(const LevelGenerator &);
	
	std::vector<BlockColor> chosenColors;

	bool IsChosenColor(BlockColor blockColor);
	static LevelGenerator* _levelGenerator;
	void GenerateBlocks(Player *player, std::vector<Block> &blocks);
	//BlockColor RandomBlockColor();
	
	

};